package com.craftsman.tomcat.tradition;


/**
 * 抽象tomcat servlet
 * @author chenfanglin
 * @date 2021年05月16日
 */
public abstract class BXServlet {

    public void service(BXRequest request, BXResponse response)throws Exception{
        if("GET".equalsIgnoreCase(request.getMethod())){
            doGet(request,response);
        }else if("POST".equalsIgnoreCase(request.getMethod())){
            doPost(request,response);
        }
    }

    public abstract void doGet(BXRequest request,BXResponse response)throws Exception;


    public abstract void doPost(BXRequest request,BXResponse response)throws Exception;


}
